package com.jame.basics.genericity;


import com.jame.basics.genericity.test1.Animal;
import com.jame.basics.genericity.test1.Cat;
import com.jame.basics.genericity.test1.XiaoHuaCat;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : Jame
 * @date : 2020-12-31 15:47
 **/
public class Demo {

    @Test
    public void test1() {
        List<? super Cat> list = new ArrayList<>();
        List<Cat> cats = new ArrayList<>();
        List<Animal> animals = new ArrayList<>();
        List<XiaoHuaCat> xiaoHuaCats = new ArrayList<>();

        list = cats;
        list = animals;

    }


}
